home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
misc
/
unpl3951.lha
/
UnpackLibV39.51
/
Include
/
Libraries
/
Unpack.h
next >
Wrap
C/C++ Source or Header
|
1992-09-02
|
12KB
|
312 lines
/* Unpack Library Include File */
#ifndef UNPACK_H
#define UNPACK_H
#ifndef EXEC_TYPES_H
#include <Exec/Types.h>
#endif
#ifndef EXEC_IO_H
#include <Exec/io.h>
#endif
#ifndef EXEC_LIBRARIES_H
#include <Exec/Libraries.h>
#endif
#ifndef DOS_DOSEXTENS_H
#include <dos/dosextens.h>
#endif
/* Library Name & Version */
#define UNPACKNAME "unpack.library"
#define UnpackVersion 39L
#define UnpackRevision 51L
/* Library Base Structure */
struct LibraryStruct {
struct Library LibNode;
BPTR LIB_SegList;
APTR LIB_DosBase;
APTR LIB_IntBase;
};
/* Unpack Numbers Structure (V37+) */
struct NumberStruct {
UWORD NS_Version; /* Library Version */
UWORD NS_Revision; /* Library Revision */
UWORD NS_Types;
UWORD NS_Unpackers;
};
/* Drive Structure (V36+) */
struct DriveStruct {
APTR DRV_UnpackInfo;
struct IOStdReq *DRV_IOStdReq;
struct MsgPort *DRV_MsgPort;
UBYTE DRV_DevName[48];
UBYTE DRV_DriveName[10];
};
/* Unpack Info Structure */
struct UnpackInfo {
APTR UI_Filename;
APTR UI_Path;
APTR UI_Jump;
APTR UI_CruncherName;
APTR UI_DecrunchAdr;
LONG UI_DecrunchLen;
UWORD UI_ErrorNum;
UWORD UI_CrunchNum;
UBYTE UI_CrunchType;
UBYTE UI_Flag;
APTR UI_LoadNamePoi;
LONG UI_CrunchLen;
APTR UI_UserData; /* V35+ */
APTR UI_TrackJump; /* V36+ */
APTR UI_TrkErrJump; /* V36+ */
LONG UI_Offset; /* V36+ */
UWORD UI_Track; /* V36+ */
APTR UI_ErrorMsg; /* V37+ */
APTR UI_CrunchAdr; /* V37+ */
APTR UI_LhaPattern; /* V38+ */
BOOL8 UI_UseFilenamePointer /* V39+ */
/* This Is Private, Do NOT Touch */
UBYTE UI_Pad
LONG UI_CrunchLenTemp;
LONG UI_FileHandler;
LONG UI_Lock;
LONG UI_OldLock;
APTR UI_InfoAdr;
APTR UI_UnpackPoi;
ULONG UI_Temp;
UBYTE UI_Data[16]; /* V35+ */
UBYTE UI_LoadName[128];
UBYTE UI_ExecuteString[256];
};
/* The UI_Flag Have The Following Definations: */
#define UFB_OneFile 0L /* This Select To Decrunch One File Or
All Files In An Archive. */
#define UFB_Delete 1L /* Delete Files After Scanning. */
#define UFB_NoFree 2L /* Free Memory After Jump (V35+) */
#define UFB_Banner 3L /* Give Banner (V36+) */
#define UFB_NoLoad 4L /* Do Not Load File (V37+) */
#define UFB_Protect 5L /* Change Protection Bits (V38+) */
#define UFN_OneFile (1L<<UFB_OneFile)
#define UFN_Delete (1L<<UFB_Delete)
#define UFN_NoFree (1L<<UFB_NoFree)
#define UFN_Banner (1L<<UFB_Banner)
#define UFN_NoLoad (1L<<UFB_NoLoad)
#define UFN_Protect (1L<<UFB_Protect)
/* And Now For The UI_CrunchType Flag: */
#define CRU_Archive 1 /* Archive (Lha, Zoo Etc.) */
#define CRU_Data 2 /* Data File */
#define CRU_Object 3 /* Object File */
#define CRU_Object2 4 /* 2 Segment Object File */
#define CRU_Track 5 /* Track File (DMS) (V36+) */
#define CRUB_Encryp 7L /* Encrypted File (If Bit Is Set) */
/* And The Error Flag: */
#define ERR_Open 1 /* Can't Open File */
#define ERR_ReadWrite 2 /* Read/Write Error */
#define ERR_Memory 3 /* Allocation Error (Out Of Memory) */
#define ERR_Determine 4 /* Can't Determine File */
#define ERR_Password 5 /* Illegal Password */
#define ERR_Hunk 6 /* Hunk Error */
#define ERR_Extern 7 /* Extern File Error */
#define ERR_Currupt 8 /* Crunched File Is Currupt (V35+) */
#define ERR_Device 9 /* Illegal Device (V36+) */
#define ERR_DevOpen 10 /* Couldn't Opn Dev. Or Create Port V36+ */
#define ERR_CRC 11 /* CRC Checksum Error (V36+) */
#define ERR_CheckSum 12 /* Checksum Error (V36+) */
#define ERR_Old 13 /* Decruncher In Lib. Too Old (V36+) */
#define ERR_DevErr 14 /* Error From Device (V36+) */
#define ERR_Protect 15 /* Couldn't Set Protection Bits (V38+) */
#define ERR_Output 16 /* Output File Error (V39+) */
/* At Last The Cruncher Numbers: */
#define MaxFilePack 12L
#define CN_Lha 1 /* Lha */
#define CN_LhaSFX 2L /* LhaSFX */
#define CN_Pak10 3L /* Pak 1.0 */
#define CN_Dms 4L /* Dms */
#define CN_GnuPack10D 12L /* Gnu Packer 1.0 D */
#define CN_GnuPack12D 13L /* Gnu Packer 1.1/1.2 D */
#define CN_GnuPack12Two 14L /* Gnu Packer 1.1/1.2 Two Segment */
#define CN_GnuPack10 15L /* Gnu Packer 1.0 */
#define CN_GnuPack12 16L /* Gnu Packer 1.1/1.2 One Segment */
#define CN_PPData 17L /* PowerPacker Data */
#define CN_PPDataE 18L /* PowerPacker Data/Encrypted */
#define CN_PPLoadSeg 19L /* PowerPacker LoadSeg */
#define CN_PPLib 20L /* PowerPacker Library */
#define CN_PPLibE 21L /* PowerPacker Library/Encrypted */
#define CN_PPLibOv 22L /* PowerPacker Library/Overlayed */
#define CN_PP2x 23L /* PowerPacker 2.x */
#define CN_PP30 24L /* PowerPacker 3.0 */
#define CN_PP30E 25L /* PowerPacker 3.0 Encrypted */
#define CN_PP30Ov 26L /* PowerPacker 3.0 Overlayed */
#define CN_PP41 27L /* PowerPacker 4.0-4.1 */
#define CN_PP41E 28L /* PowerPacker 4.0-4.1 Encrypted */
#define CN_PP41Ov 29L /* PowerPacker 4.0-4.1 Overlayed */
#define CN_Turtle13 30L /* Turtle Smasher 1.3 */
#define CN_TSqueeze80 31L /* TurboSqueezer 8.0 */
#define CN_TSqueeze80S 32L /* TurboSqueezer 8.0 Small */
#define CN_TryIt101 33L /* TryIt 1.01 */
#define CN_Titanic11 34L /* Titanics Cruncher 1.1 */
#define CN_Titanic12 35L /* Titanics Cruncher 1.2 */
#define CN_Time22 36L /* Time Cruncher 1.7-2.2 */
#define CN_Tetra21 37L /* TetraPacker 2.1 */
#define CN_Tetra21Pro 38L /* TetraPacker 2.1 Pro */
#define CN_Tetra22 39L /* TetraPacker 2.2 */
#define CN_Tetra22Pro 40L /* TetraPacker 2.2 Pro */
#define CN_Tetra102 41L /* TetraCrunch 1.02 */
#define CN_Tetra11 42L /* TetraCrunch 1.1 */
#define CN_Stone299d 43L /* Stone Cracker 2.99d */
#define CN_Stone311 44L /* Stone Cracker 3.11 */
#define CN_Stone401A 45L /* Stone Cracker 4.01 A */
#define CN_Imploder31 46L /* Imploder 1.0-3.1 */
#define CN_Imploder31P 47L /* Imploder 1.0-3.1 Protected */
#define CN_Imploder31L 48L /* Imploder 1.0-3.1 Library */
#define CN_Imploder31LP 49L /* Imploder 1.0-3.1 Library/Protected */
#define CN_Imploder40 50L /* Imploder 4.0 */
#define CN_Imploder40L 51L /* Imploder 4.0 Library */
#define CN_BlkDec21 52L /* Black & Decker 2.0-2.1 */
#define CN_BytKil20 53L /* ByteKiller 2.0 */
#define CN_BytKil30 54L /* ByteKiller 3.0 */
#define CN_TNMCrun11 55L /* TNM Cruncher 1.1 */
#define CN_CrunMast10 56L /* Crunch Master 1.0 */
#define CN_CrMania14A 57L /* Crunch Mania 1.4-1.9t A */
#define CN_CrMania14AP 58L /* Crunch Mania 1.4-1.8 A/P */
#define CN_CrMania14D 59L /* Crunch Mania 1.4-1.9t D */
#define CN_CrMania18R 60L /* Crunch Mania 1.4-1.9t R */
#define CN_CrMania18RS 61L /* Crunch Mania 1.4-1.9t R/S */
#define CN_CrMania18RL 62L /* Crunch Mania 1.8-1.9t R/L */
#define CN_CrMania18RLH 63L /* Crunch Mania 1.8-1.9t R/L/H */
#define CN_CrMania18RH 64L /* Crunch Mania 1.8-1.9t R/H */
#define CN_CrMania18DH 65L /* Crunch Mania 1.8-1.9t D/H */
#define CN_CrMania18DHS 66L /* Crunch Mania 1.8-1.9t D/H/S */
#define CN_CrMania18DS 67L /* Crunch Mania 1.8-1.9t D/S */
#define CN_DoubAction10 68L /* Double Action 1.0 */
#define CN_DragPack10 69L /* DragPack 1.0 */
#define CN_House14 70L /* House 1.4 (RSI-Packer) */
#define CN_HPC 71L /* High Pressure Cruncher */
#define CN_HPCU 72L /* High Pressure Cruncher U */
#define CN_IAM10Ice 73L /* IAM Packer Pro 1.0 Ice */
#define CN_IAM10IceD 74L /* IAM Packer Pro 1.0 Ice/D */
#define CN_IAM10Atm5 75L /* IAM Packer Pro 1.0 Atm5 */
#define CN_IAM10Atm5D 76L /* IAM Packer Pro 1.0 Atm5/D */
#define CN_ISC15P1 77L /* ISC 1.5 Pass 1 */
#define CN_ISC15P2 78L /* ISC 1.5 Pass 2 */
#define CN_ISC15P3 79L /* ISC 1.5 Pass 3 */
#define CN_MastCrun31A 80L /* Master Cruncher 3.0-3.1 A */
#define CN_MastCrun31R 81L /* Master Cruncher 3.0-3.1 R */
#define CN_MastCrun31D 82L /* Master Cruncher 3.0-3.1 D */
#define CN_MegaCrun10 83L /* Megacruncher 1.0 */
#define CN_MegaCrun12A 84L /* Megacruncher 1.2 A */
#define CN_MegaCrun12R 85L /* Megacruncher 1.2 R */
#define CN_Defjam36 86L /* Defjam 3.2-3.6 */
#define CN_Defjam36Pro 87L /* Defjam 3.2-3.6 Pro */
#define CN_PackIt10 88L /* PackIt 1.0 */
#define CN_PackIt10D 89L /* PackIt 1.0 D */
#define CN_Relokit10 90L /* Relokit 1.0 */
#define CN_Spike15 91L /* Spike Cruncher 1.1-1.5 */
#define CN_SuperCrun27 92L /* Super Cruncher 2.7 */
#define CN_Syncro46 93L /* Syncro Packer 4.6 */
#define CN_Syncro46K 94L /* Syncro Packer 4.6 K */
#define CN_Syncro46R 95L /* Syncro Packer 4.6 R */
#define CN_Syncro46RK 96L /* Syncro Packer 4.6 R/K */
#define CN_Stone400 97L /* Stone Cracker 4.00 */
#define CN_Stone400D 98L /* Stone Cracker 4.00 D */
#define CN_Stone401C 99L /* Stone Cracker 4.01 C */
#define CN_Stone401D 100L /* Stone Cracker 4.01 D */
#define CN_XpkBLZW 101L /* XPK-BLZW */
#define CN_XpkCBR0 102L /* XPK-CBR0 */
#define CN_XpkDLTA 103L /* XPK-DLTA */
#define CN_XpkFEAL 104L /* XPK-FEAL */
#define CN_XpkHUFF 105L /* XPK-HUFF */
#define CN_XpkIDEA 106L /* XPK-IDEA */
#define CN_XpkIMPL 107L /* XPK-IMPL */
#define CN_XpkNONE 108L /* XPK-NONE */
#define CN_XpkNUKE 109L /* XPK-NUKE */
#define CN_XpkRDCN 110L /* XPK-RDCN */
#define CN_XpkRLEN 111L /* XPK-RLEN */
#define CN_XpkSHRI 112L /* XPK-SHRI */
#define CN_MaxPacker12 113L /* MaxPacker 1.2 */
#define CN_PMC 114L /* PMC Cruncher */
#define CN_Stone271 115L /* Stone Cracker 2.6a-2.71 */
#define CN_Stone271K 116L /* Stone Cracker 2.6a-2.71 K */
#define CN_Stone310 117L /* Stone Cracker 3.10 */
#define CN_Stone402 118L /* Stone Cracker 4.02a */
#define CN_Stone402A 119L /* Stone Cracker 4.02a A */
#define CN_Stone402D 120L /* Stone Cracker 4.02a D */
#define CN_Stone402L 121L /* Stone Cracker 4.02a L */
#define CN_Turtle200 122L /* Turtle Smasher 2.00 */
#define CN_Turtle200D 123L /* Turtle Smasher 2.00 D */
#define CN_ANC 124L /* ANC-Cruncher */
#define CN_DisImp10 125L /* Discovery File Imploder 1.0 */
#define CN_HQC20 126L /* HQC Cruncher 2.0 */
#define CN_XpkCRM2 127L /* XPK-CRM2 */
#define CN_XpkENCO 128L /* XPK-ENCO */
#define CN_XpkFAST 129L /* XPK-FAST */
#define CN_Stone292 130L /* Stone Cracker 2.92 */
#define CN_Stone299 131L /* Stone Cracker 2.99 */
#define CN_PCompress29 132L /* P-Compress 2.9 */
#define CN_CrMania19AP 133L /* Crunch Mania 1.9t A/P */
#define CN_CrMania19AH 134L /* Crunch Mania 1.9t A/H */
#define CN_CrMania19AHP 135L /* Crunch Mania 1.9t A/H/P */
#define CN_TSqueeze61 136L /* TurboSqueezer 6.1 */
#define CN_FlashSpeed10 137L /* FlashSpeed 1.0 */
#define CN_BytKilPro10 138L /* ByteKiller 1.0 Pro */
#define CN_BytKilPro10K 139L /* ByteKiller 1.0 Pro K */
#define CN_Stone401bA 140L /* Stone Cracker 4.01ß A */
#define CN_TrashEli10 141L /* Trash Eliminator 1.0 */
#define CN_Ultimate11b 142L /* Ultimate Packer 1.1b */
#define CN_TFA154 143L /* TFA Cruncher 1.54 */
#define CN_SExec11 144L /* S-Exec 1.1 */
#define CN_Stone4102 145L /* Stone Cracker 4.10.2 */
#define CN_Stone4102A 146L /* Stone Cracker 4.10.2 A */
#define CN_Stone4102AP 147L /* Stone Cracker 4.10.2 A/Plain */
#define CN_Stone4102APr 148L /* Stone Cracker 4.10.2 A/Pro */
#define CN_Stone4102D 149L /* Stone Cracker 4.10.2 D */
#define CN_Stone4102L 150L /* Stone Cracker 4.10.2 L */
#define CN_DragPack252 151L /* DragPack 2.52 */
#define CN_DragPack252D 152L /* DragPack 2.52 D */
#define CN_Stone300 153L /* Stone Cracker 3.00 */
#define CN_Stone300D 154L /* Stone Cracker 3.00 D */
#define CN_Stone300K 155L /* Stone Cracker 3.00 K */
#define CN_XpkSQSH 156L /* XPK-SQSH */
/* This Label Will Be Deleted Later On */
#define CN_ComCra11 CN_TNMCrun11 /* Compressor Crackings Inc. V1.1 */
#endif